<div class="form-group">
    <label class="col-sm-1 control-label">编码</label>
    <div class="col-sm-5">
        {ife 'groups.goods' $item}
        <input type="text" name="goodssn" id="goodssn" class="form-control hasoption" value="{$item['goodssn']}" {if $item['hasoption']}readonly{/if}//>
        {else}
        <div class='form-control-static'>{$item['goodssn']}</div>
        {/if}
    </div>

    <label class=" col-sm-1 control-label">条码</label>
    <div class="col-sm-5">
        {ife 'groups.goods' $item}
        <input type="text" name="productsn" id="productsn" class="form-control hasoption" value="{$item['productsn']}" {if $item['hasoption']}readonly{/if}//>
        {else}
        <div class='form-control-static'>{$item['productsn']}</div>
        {/if}
    </div>
</div>
<div class="form-group" style="display: none;">
    <label class="col-sm-1 control-label">重量</label>
    <div class="col-sm-11">
        {ife 'groups.goods' $item}
        <div class="input-group">
            <input type="text" name="weight" id="weight" class="form-control hasoption" value="{$item['weight']}" {if $item['hasoption']}readonly{/if}/>
            <span class="input-group-addon">克</span>
        </div>
        {else}
        <div class='form-control-static'>{$item['weight']} 克</div>
        {/if}
    </div>
</div>

<div class="form-group">
    <label class="col-sm-1 control-label">库存</label>
    <div class="col-sm-11">
        {ife 'groups.goods' $item}
        <input type="text" name="stock" id="stock" class="form-control hasoption" value="{$item['stock']}"  style="width:150px;display: inline;margin-right: 20px;" {if $item['hasoption']}readonly{/if}/>
        <label class="checkbox-inline">
            <input type="checkbox" id="showstock" value="1" name="showstock" {if $item['showstock']==1}checked{/if} />显示库存
        </label>
        {else}
        <div class='form-control-static'>{$item['stock']} 件 {if empty($item['showstock'])}隐藏库存{else}显示库存{/if}</div>
        {/if}
    </div>
</div>